<?php
namespace app\main\controller;

use cmf\controller\AdminBaseController;

class AdminMemberController extends AdminBaseController
{
    protected function initialize()
    {
        parent::initialize();
        $adminId = cmf_get_current_admin_id(); //获取后台管理员id，可判断是否登录
        if (!empty($adminId)) {
            $this->assign('admin_id', $adminId);
        }
    }

    /**
     * 会员管理
     * @adminMenu(
     *     'name'   => '会员管理',
     *     'parent' => 'admin/Plugin/default',
     *     'display'=> true,//菜单是否显示
     *     'hasView'=> true,//菜单是否有界面
     *     'order'  => 10000,//菜单排序
     *     'icon'   => '',
     *     'remark' => '会员管理',
     *     'param'  => ''
     * )
     */
    public function index()
    {
        return $this->fetch();
    }


    /**
     * 会员设置
     * @adminMenu(
     *     'name'   => '会员设置',
     *     'parent' => 'index',
     *     'display'=> false,
     *     'hasView'=> false,
     *     'order'  => 10000,
     *     'icon'   => '',
     *     'remark' => '会员设置',
     *     'param'  => ''
     * )
     */
    public function setting()
    {
        $this->success('成功');
    }

}
